package com.is.add.controller.vo;

import com.is.add.model.Deposit;
import com.is.add.util.DateUtil.DateStyle;
import com.is.add.util.DateUtil.DateUtil;
import com.is.add.util.VoUtil;

import java.util.ArrayList;
import java.util.List;

/**
 * 备用金信息VO
 * Created by jackie on 2016/9/6.
 */
public class DepositRecordVO {
    private Long    shopId;                                 //场馆ID
    private String  shopCode;                               //场馆编号
    private String  shopName;                               //场馆名称
    private Double  oldSum;                                 //原始金额
    private Double  changeSum;                              //变动金额
    private Double  newSum;                                 //操作后金额
    private String  otpType;                                //操作方式
    private String  optTime;                                //操作时间
    private String  remark;                                 //备注

    public static DepositRecordVO generateBy(Deposit deposit){
        DepositRecordVO recordVO = VoUtil.copyBasic(DepositRecordVO.class, deposit);
        assert recordVO != null;
        recordVO.setOptTime(DateUtil.DateToString(deposit.getOptTime(), DateStyle.YYYY_MM_DD_HH_MM_SS));
        return  recordVO;
    }
    public static List<DepositRecordVO> generateBy(List<Deposit> depositList){
        List<DepositRecordVO> list= new ArrayList<>();
        for (Deposit deposit:depositList){
            list.add(generateBy(deposit));
        }
        return list;
    }

    public Long getShopId() {
        return shopId;
    }

    public void setShopId(Long shopId) {
        this.shopId = shopId;
    }

    public String getShopCode() {
        return shopCode;
    }

    public void setShopCode(String shopCode) {
        this.shopCode = shopCode;
    }

    public String getShopName() {
        return shopName;
    }

    public void setShopName(String shopName) {
        this.shopName = shopName;
    }

    public Double getOldSum() {
        return oldSum;
    }

    public void setOldSum(Double oldSum) {
        this.oldSum = oldSum;
    }

    public Double getChangeSum() {
        return changeSum;
    }

    public void setChangeSum(Double changeSum) {
        this.changeSum = changeSum;
    }

    public Double getNewSum() {
        return newSum;
    }

    public void setNewSum(Double newSum) {
        this.newSum = newSum;
    }

    public String getOtpType() {
        return otpType;
    }

    public void setOtpType(String otpType) {
        this.otpType = otpType;
    }

    public String getOptTime() {
        return optTime;
    }

    public void setOptTime(String optTime) {
        this.optTime = optTime;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }
}
